package yunjiao.designpatterns.state;

import lombok.Data;

/**
 * TODO
 *
 * @author yangyunjiao
 */
@Data
public class ShipmentContext {
    protected Shipment shipment;
    protected ShipmentState currentState;
    protected boolean customerAtLocation = false;
    protected int currentLocationIndex = 0;

    public ShipmentContext(Shipment shipment) {
        super();
        this.shipment = shipment;
        this.currentState = new OrderPlaced();
    }

    public void processShipment() {
        currentState.processShipment(this);
    }
}
